package com.analysis.apresunday.controller;

import com.analysis.apresunday.config.R;
import com.analysis.apresunday.entity.po.AnalysisScale;
import com.analysis.apresunday.service.AnalysisScaleService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

@RestController
@RequestMapping("/scaleInfo")
@CrossOrigin
@Slf4j
@Tag(name = "公司规模的数量和对岗位数量、平均薪水的分析")
public class AnalysisScaleController {

    @Resource
    AnalysisScaleService analysisScaleService;

    @Operation(summary = "获取公司规模统计数据")
    @GetMapping("/getStatisticList")
    public R getScaleStatistic() {
        List<AnalysisScale> list = analysisScaleService.getStatisticList();
        return R.ok().data("scaleStatistic",list);
    }


}
